import { useState, useEffect } from 'react';

function App() {
  const [count, setCount] = useState(0);

  useEffect(() => {
    setInterval(() => {
      setCount(parseInt(Math.random() * 100));
      // setCount(1);
    }, 1000);
  }, []);

  return <div>当前数值: {count}</div>;
}

export default App;
